package model

import (
	"api-getaway/basic/config"
	"gorm.io/gorm"
)

type User struct {
	gorm.Model
	Password string `gorm:"type:varchar(32);not null;comment:'密码'"`
	Mobile   string `gorm:"type:char(11);not null;comment:'手机号'"`
}

func (u *User) CreateUser() error {
	return config.DB.Debug().Create(&u).Error
}
